# creator   : Maxwene
# email     : 2118698104@qq.com


createDirectory(){
    echo "create directory -- build"
    mkdir build
    rm quadtree
    cd build
    rm * -r
}

makeFile(){
    echo "make file start"
    cmake ..
    make
}

mov2directory(){
    echo "mov test to ../run_program"
    # cp bin/test ../test
    # cp bin/route ../route
    cp bin/miao ../quadtree
}

cd2host(){
    cd ..
}

runprogram(){
    # ./test
    # ./route
    ./quadtree
}

start_make(){
    createDirectory
    makeFile
    mov2directory
    cd2host
    runprogram
}


start_make 
